package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow;

import com.glsc.ngateway.common.base.domain.mysql.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author xuchang
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
@SQLDelete(sql = "update t_gw_flow_form_equipment_apply_cloud_device_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@SQLDeleteAll(sql = "update t_gw_flow_form_equipment_apply_cloud_device_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@Where(clause = "deleted = 0")
@Table(name = "t_gw_flow_form_equipment_apply_cloud_device_detail")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_form_equipment_apply_cloud_device_detail", comment = "设备变更流程form表单-云平台子表")
public class FlowFormEquipmentApplyCloudDeviceDetail extends BaseEntity {

    private static final long serialVersionUID = -3558154628744228100L;

    @Column(name = "equipment_apply_id", columnDefinition = "bigint not null comment '主表ID'")
    private Long equipmentApplyId;

    @Column(name = "cloud_id", columnDefinition = "int comment '云平台'")
    private String cloudId;

    @Column(name = "cloud_style", columnDefinition = "int comment '类型'")
    private String cloudStyle;

    @Column(name = "cloud_area", columnDefinition = "int comment '区域'")
    private Integer cloudArea;

    @Column(name = "inside_ip", columnDefinition = "varchar(32) not null comment '区域'")
    private String insideIp;

    @Column(name = "eip", columnDefinition = "varchar(32) comment 'eip'")
    private String eip;

    @Column(name = "slb", columnDefinition = "varchar(32) comment 'slb'")
    private String slb;

    @Column(name = "operation_sys", columnDefinition = "int comment '操作系统'")
    private String operationSys;

    @Column(name = "cpu", columnDefinition = "int comment 'cpu'")
    private String cpu;

    @Column(name = "memory", columnDefinition = "int comment '内存'")
    private String memory;

    @Column(name = "user_id", columnDefinition = "varchar(32) comment '责任人'")
    private String userId;

    @Column(name = "manage_control", columnDefinition = "varchar(32) comment '管理控制台'")
    private String manageControl;

    @Column(name = "master_name", columnDefinition = "varchar(32) comment '主机名'")
    private String masterName;

    @Column(name = "mark", columnDefinition = "varchar(32) comment 'mark'")
    private String mark;

    @Column(name = "application", columnDefinition = "varchar(32) comment '应用'")
    private String application;

}
